package com.qingcloud.adminbackend.entity.command;

import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * iot平台指令记录
 */
@Data
public class CommandRecord implements Serializable {

    //指令流水号
    private Integer id;

    //指令时间戳
    private String commandQn = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS"));

    //设备编号
    private String equipmentId;

    /**
     * 指令种类(1: 查询； 2：设置;)
     */
    private int cmdCatagory;

    //指令类型码
    private String cmdCode;

    //指令参数
    private String parameter;

    //指令请求结果
    private Integer qtnResult;

    //指令执行结果
    private Integer exeResult;

    //查询指令结果
    private String result;

    //指令下发时间
    private String resultDt;

    //指令下发时间
    private String createDt = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));

    //指令下发人
    private String createBy = "iot_test";
}
